<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of news
 * 
 * @author Subha Sundar Das (subhasundar.das@gmail.com)
 */
class News extends CI_Controller {

    //put your code here


    function News() {
        parent :: __construct();
        $this->load->model('pickup_model');
    }
 
//--Subha (View Single News by ID ---//    
    function view($title='',$news_id=0){
        $sql = "Select * from news where id=$news_id and status=51 limit 1";
        $result = $this->db->query($sql)->row();
        
        //--Common Call ---//
        $data['recent_news'] = $this->commoncall->get_recent_news(5);
        $data['car_make'] = $this->pickup_model->get_car_makes();
        $data['car_body_type'] = $this->pickup_model->get_pickup(3);
        $data['car_budget'] = $this->pickup_model->get_pickup(7);
        $data['car_color'] = $this->pickup_model->get_pickup(8);
        $data['car_transmission'] = $this->pickup_model->get_pickup(2);
        
        $data['news'] = $result;
        
        $this->load->view('content',$data);
        
    }
    

}

?>
